<div class="form">
    <?php
    /** @var ValoresNutricionalesController $this */
    /** @var ValoresNutricionales $model */
    /** @var AweActiveForm $form */
    $form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
        'id' => 'valores-nutricionales-form',
        'enableAjaxValidation' => false,
        'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,),
        'enableClientValidation' => true,
    ));
    ?>

    <p class="note">
        <?php echo Yii::t('AweCrud.app', 'Fields with') ?> <span class="required">*</span>
        <?php echo Yii::t('AweCrud.app', 'are required') ?>.    </p>

    <?php echo $form->errorSummary($model) ?>
    <div class="row-fluid">
        <div class="spna5">
            <?php echo $form->dropDownListRow($model, 'alimentos_id', array('' => ' -- Seleccione -- ') + CHtml::listData(Alimentos::model()->findAll(), 'id', Alimentos::representingColumn())) ?>
        </div>           
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'porcentaje_agua', array('maxlength' => 5)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                      
            <?php echo $form->textFieldRow($model, 'agua_g', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'energia_kcal', array('maxlength' => 5)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">         
            <?php echo $form->textFieldRow($model, 'proteinas_g', array('maxlength' => 4)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'grasa_total_g', array('maxlength' => 5)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'carbohidratos_g', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'fibra_dietetica_g', array('maxlength' => 4)) ?>
        </div>        
    </div>        
    <div class="row-fluid">
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'fibra_cruda_g', array('maxlength' => 4)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'fibra_dietaria_g', array('maxlength' => 4)) 
                    //TODO verificar que no sea repetido fibra dietetica y fibradietaria ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                       
            <?php echo $form->textFieldRow($model, 'ceniza_g', array('maxlength' => 4)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'calcio_mg', array('maxlength' => 5)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                       
            <?php echo $form->textFieldRow($model, 'fosforo_mg', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'hierro_mg', array('maxlength' => 4)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                       
            <?php echo $form->textFieldRow($model, 'tiamina_mg', array('maxlength' => 3)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'riboflavina_mg', array('maxlength' => 3)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                      
            <?php echo $form->textFieldRow($model, 'niacina_mg', array('maxlength' => 4)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'vitamina_c_mg', array('maxlength' => 4)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                       
            <?php echo $form->textFieldRow($model, 'vitamina_a_eqiv_retinol_mcg', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'acidos_grasos_monoinsat_g', array('maxlength' => 4)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                       
            <?php echo $form->textFieldRow($model, 'acidos_grasos_poliinsaturad_g', array('maxlength' => 4)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'acidos_grasos_saturados_g', array('maxlength' => 4)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                       
            <?php echo $form->textFieldRow($model, 'colesterol_mg', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'potasio_mg', array('maxlength' => 6)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                      
            <?php echo $form->textFieldRow($model, 'sodio_mg', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'zinc_mg', array('maxlength' => 4)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                      
            <?php echo $form->textFieldRow($model, 'magnesio_mg', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">  
            <?php echo $form->textFieldRow($model, 'vitamina_b6_mg', array('maxlength' => 4)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                      
            <?php echo $form->textFieldRow($model, 'vitamina_b12_mcg', array('maxlength' => 4)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'folato_mcg', array('maxlength' => 4)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                      
            <?php echo $form->textFieldRow($model, 'porcentaje_fracc_comestible', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'b_caroteno_equiv_totales_ug', array('maxlength' => 5)) ?>
        </div>       
    </div>       
    <div class="row-fluid">
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'retinol_ug', array('maxlength' => 6)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'asct_mg', array('maxlength' => 3)) ?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="spna5">                       
            <?php echo $form->textFieldRow($model, 'ch2o_g', array('maxlength' => 5)) ?>
        </div>
        <div class="spna5">
            <?php echo $form->textFieldRow($model, 'equivalentes_totales', array('maxlength' => 45)) ?>
        </div>   
    </div>   
    <div class="form-actions">
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            //'buttonType'=>'submit',
            'label' => Yii::t('AweCrud.app', 'Cancel'),
            'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
        ));
        ?>
    </div>

    <?php $this->endWidget(); ?>
</div>